package com.smart_campus.bus.mapper;


import com.smart_campus.bus.domain.Journal;
import com.smart_campus.bus.vo.JournalVo;
import com.smart_campus.sys.common.DataGridView;
import com.smart_campus.sys.common.ResultObj;
import com.smart_campus.bus.domain.ModelType;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author saoji
 * @since 2020-06-07
 */

@Repository
@Transactional
public interface JournalMapper{

    List<Journal> getJournal(@Param("page")Integer page,@Param("limit") Integer limit,
                             @Param("type") String type,@Param("keyWords") String keyWords);

    List<ModelType> getAllModelType();//查询模块类型

    Journal getDataById(int id);//根据id获取数据

    Boolean addJournal(Journal journal);//添加

    Boolean updateJournal(Journal journal);//修改

    Boolean removeJournal(int id);//删除

    List<Journal> selallJournal(JournalVo vo);

    Boolean addReadCount(Journal journal);

    Boolean addCommentCount(Journal journal);

    List<Journal> getDataByModel(@Param("page")Integer page,@Param("limit") Integer limit, @Param("model") String model);

    List<Journal> getHotNews();
}
